﻿/*
 *  Copyright 2009 Duck Pond, Inc.
 *  http://www.duckpondinc.com/
 *  
 *  This file is part of Server Watch & Alert.
 *
 *  Server Watch & Alert is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  Server Watch & Alert is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Server Watch & Alert.  If not, see <http://www.gnu.org/licenses/>.
 *  
 * */

using System.Collections.Generic;
using System.Xml.Serialization;

namespace DuckPond.ServerWatchAlert.Core.ResultActions
{
    //[XmlElement(ElementName="result-action")]
    public abstract class ResultAction
    {
        /////////////////////
        // PROPERTIES
        /////////////
        [XmlAttribute("name")]
        public string Name { get; set; }


        /////////////////////
        // METHODS
        /////////////
        /// <summary>
        /// Returns true if suceeded. False if failed.
        /// </summary>
        /// <returns></returns>
        public abstract void PerformAction(TestResult testData, IEnumerable<TestResult> resultHistory);
    }
}
